const state = {
  currentChooseId: null, // 当前选中组件id
  currentChooseData: {}, // 当前选中组件数据
  deletedChooseId: null, // 当前被删除组件id
};

const actions = {};

const mutations = {
  currentChooseId(state, currentChooseId) {
    state.currentChooseId = currentChooseId;
  },
  currentChooseData(state, currentChooseData) {
    state.currentChooseData = currentChooseData;
  },
  deletedChooseId(state, deletedChooseId) {
    state.deletedChooseId = deletedChooseId;
  },
};

const getters = {
  currentChooseId: (state) => {
    return state.currentChooseId;
  },
  currentChooseData: (state) => {
    return state.currentChooseData;
  },
  deletedChooseId: (state) => {
    return state.deletedChooseId;
  },
};

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters,
};
